﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;

namespace UtilZ.Dotnet.Ex.Communication.Net.Ftp
{
    /// <summary>
    /// ftp命令
    /// </summary>
    public class FtpCommands
    {
        /// <summary>
        /// (ABORT)此命令使服务器终止前一个FTP服务命令以及任何相关数据传输。
        /// Abort an active file transfer.
        /// </summary>
        public const string ABOR = "ABOR";

        /// <summary>
        /// ABOT,同ABOR
        /// </summary>
        public const string ABOT = "ABOT";

        /// <summary>
        /// (ACCOUNT)此命令的参数部分使用一个Telnet字符串来指明用户的账户。
        /// Account information.
        /// </summary>
        public const string ACCT = "ACCT";

        /// <summary>
        /// (AUTHENTICATION/SECURITY DATA)认证/安全数据
        /// RFC 2228	Authentication/Security Data
        /// </summary>
        public const string ADAT = "ADAT";

        /// <summary>
        /// 为接收一个文件分配足够的磁盘空间
        /// Allocate sufficient disk space to receive a file.
        /// </summary>
        public const string ALLO = "ALLO";

        /// <summary>
        /// 增加
        /// Append.
        /// </summary>
        public const string APPE = "APPE";

        /// <summary>
        /// 认证/安全机制
        /// RFC 2228	Authentication/Security Mechanism
        /// </summary>
        public const string AUTH = "AUTH";

        /// <summary>
        /// 退出
        /// </summary>
        public const string BYE = "BYE";

        /// <summary>
        /// 清除命令通道
        /// RFC 2228	Clear Command Channel
        /// </summary>
        public const string CCC = "CCC";

        /// <summary>
        /// 改变到父目录
        /// Change to Parent Directory.
        /// </summary>
        public const string CDUP = "CDUP";

        /// <summary>
        /// 机密性保护命令
        /// RFC 2228	Confidentiality Protection Command
        /// </summary>
        public const string CONF = "CONF";

        /// <summary>
        /// 改变工作目录
        /// Change working directory.
        /// </summary>
        public const string CWD = "CWD";

        /// <summary>
        /// 删除文件
        /// Delete file.
        /// </summary>
        public const string DELE = "DELE";

        /// <summary>
        /// 隐私保护通道
        /// RFC 2228	Privacy Protected Channel
        /// </summary>
        public const string ENC = "ENC";

        /// <summary>
        /// 为服务器指定要连接的扩展地址和端口
        /// RFC 2428	Specifies an extended address and port to which the server should connect.
        /// </summary>
        public const string EPRT = "EPRT";

        /// <summary>
        /// 进入扩展被动模式
        /// RFC 2428	Enter extended passive mode.
        /// </summary>
        public const string EPSV = "EPSV";

        /// <summary>
        /// 获得服务器支持的特性列表
        /// RFC 2389	Get the feature list implemented by the server.
        /// </summary>
        public const string FEAT = "FEAT";

        /// <summary>
        /// 如果指定了命令，返回命令使用文档；否则返回一个通用帮助文档
        /// Returns usage documentation on a command if specified, else a general help document is returned.
        /// </summary>
        public const string HELP = "HELP";

        /// <summary>
        /// 确定服务器上所需的虚拟主机名。
        /// RFC 7151	Identify desired virtual host on server, by name.
        /// </summary>
        public const string HOST = "HOST";

        /// <summary>
        /// 语言协商
        /// RFC 2640	Language Negotiation
        /// </summary>
        public const string LANG = "LANG";

        /// <summary>
        /// 列表当前工作目录下的文件和文件夹列表,包含创建时间文件大小等信息
        /// </summary>
        public const string LIST = "LIST";

        /// <summary>
        /// 返回指定目录的文件和文件夹名列表
        /// Returns a list of file names in a specified directory.
        /// </summary>
        public const string NLST = "NLST";

        /// <summary>
        /// 为服务器指定要连接的长地址和端口
        /// RFC 1639	Specifies a long address and port to which the server should connect.
        /// </summary>
        public const string LPRT = "LPRT";

        /// <summary>
        /// 进入长被动模式
        /// RFC 1639	Enter long passive mode.
        /// </summary>
        public const string LPSV = "LPSV";

        /// <summary>
        /// 返回指定文件的最后修改时间
        /// RFC 3659	Return the last-modified time of a specified file.
        /// </summary>
        public const string MDTM = "MDTM";

        /// <summary>
        /// 修改文件的最后修改时间
        /// </summary>
        public const string MFMT = "MFMT";

        /// <summary>
        /// 完整性保护命令
        /// RFC 2228	Integrity Protected Command
        /// </summary>
        public const string MIC = "MIC";

        /// <summary>
        /// 创建目录
        /// Make directory.
        /// </summary>
        public const string MKD = "MKD";

        /// <summary>
        /// 如果目录被命名，列出目录的内容
        /// RFC 3659	Lists the contents of a directory if a directory is named.
        /// </summary>
        public const string MLSD = "MLSD";

        /// <summary>
        /// 提供命令行指定的对象的数据
        /// RFC 3659	Provides data about exactly the object named on its command line, and no others.
        /// </summary>
        public const string MLST = "MLST";

        /// <summary>
        /// 设定传输模式（流、块或压缩，S=流模式，B=块模式，C=压缩模式）
        /// Sets the transfer mode (Stream, Block, or Compressed).
        /// </summary>
        public const string MODE = "MODE";



        /// <summary>
        /// 无操作（哑包；通常用来保活）
        /// No operation (dummy packet; used mostly on keepalives).
        /// </summary>
        public const string NOOP = "NOOP";

        /// <summary>
        /// 为特性选择选项
        /// RFC 2389	Select options for a feature.
        /// </summary>
        public const string OPTS = "OPTS";

        /// <summary>
        /// 认证密码
        /// Authentication password.
        /// </summary>
        public const string PASS = "PASS";

        /// <summary>
        /// 进入被动模式
        /// Enter passive mode.
        /// </summary>
        public const string PASV = "PASV";

        /// <summary>
        /// 保护缓冲大小
        /// RFC 2228	Protection Buffer Size
        /// </summary>
        public const string PBSZ = "PBSZ";

        /// <summary>
        /// 指定服务器要连接的地址和端口
        /// Specifies an address and port to which the server should connect.
        /// </summary>
        public const string PORT = "PORT";

        /// <summary>
        /// 数据通道保护级别
        /// RFC 2228	Data Channel Protection Level.
        /// </summary>
        public const string PROT = "PROT";

        /// <summary>
        /// 打印工作目录，返回主机的当前目录
        /// Print working directory. Returns the current directory of the host.
        /// </summary>
        public const string PWD = "PWD";

        /// <summary>
        /// 断开连接
        /// Disconnect.
        /// </summary>
        public const string QUIT = "QUIT";

        /// <summary>
        /// 重新初始化连接
        /// Re initializes the connection.
        /// </summary>
        public const string REIN = "REIN";

        /// <summary>
        /// 从指定点重新开始传输
        /// Restart transfer from the specified point.
        /// </summary>
        public const string REST = "REST";


        /// <summary>
        /// 传输文件副本
        /// Retrieve a copy of the file
        /// </summary>
        public const string RETR = "RETR";

        /// <summary>
        /// 传输文件副本
        /// Retrieve a copy of the file
        /// </summary>
        public const string GET = "GET";

        /// <summary>
        /// 传输文件副本
        /// Retrieve a copy of the file
        /// </summary>
        public const string RECV = "RECV";

      

        /// <summary>
        /// 删除目录
        /// Remove a directory.
        /// </summary>
        public const string RMD = "RMD";

        /// <summary>
        /// 从...重命名
        /// Rename from.
        /// </summary>
        public const string RNFR = "RNFR";

        /// <summary>
        /// 重命名到...
        /// Rename to.
        /// </summary>
        public const string RNTO = "RNTO";

        /// <summary>
        /// 发送站点特殊命令到远端服务器
        /// Sends site specific commands to remote server.
        /// </summary>
        public const string SITE = "SITE";

        /// <summary>
        /// 返回文件大小
        /// RFC 3659	Return the size of a file.
        /// </summary>
        public const string SIZE = "SIZE";

        /// <summary>
        /// 挂载文件结构
        /// Mount file structure.
        /// </summary>
        public const string SMNT = "SMNT";

        /// <summary>
        /// 返回当前状态
        /// Returns the current status.
        /// </summary>
        public const string STAT = "STAT";



        /// <summary>
        /// 接收数据并且在服务器站点保存为文件
        /// Accept the data and to store the data as a file at the server site
        /// </summary>
        public const string STOR = "STOR";

        /// <summary>
        /// 接收数据并且在服务器站点保存为文件
        /// Accept the data and to store the data as a file at the server site
        /// </summary>
        public const string SEND = "SEND";

        /// <summary>
        /// 接收数据并且在服务器站点保存为文件
        /// Accept the data and to store the data as a file at the server site
        /// </summary>
        public const string PUT = "PUT";


        
        /// <summary>
        /// 唯一地保存文件
        /// Store file uniquely.
        /// </summary>
        public const string STOU = "STOU";

        /// <summary>
        /// 设定文件传输结构
        /// Set file transfer structure.
        /// </summary>
        public const string STRU = "STRU";

        /// <summary>
        /// 返回系统类型
        /// Return system type.
        /// </summary>
        public const string SYST = "SYST";

        /// <summary>
        /// 设定传输模式（ASCII/二进制) A/I.
        /// Sets the transfer mode (ASCII/Binary).
        /// </summary>
        public const string TYPE = "TYPE";

        /// <summary>
        /// 认证用户名
        /// Authentication username.
        /// </summary>
        public const string USER = "USER";



        /// <summary>
        /// 改变之当前工作目录的父目录
        /// RFC 775	Change to the parent of the current working directory
        /// </summary>
        public const string XCUP = "XCUP";

        /// <summary>
        /// 创建目录
        /// RFC 775	Make a directory
        /// </summary>
        public const string XMKD = "XMKD";

        /// <summary>
        /// 打印当前工作目录
        /// RFC 775	Print the current working directory
        /// </summary>
        public const string XPWD = "XPWD";

        /// <summary>
        /// RFC 743
        /// </summary>
        public const string XRCP = "XRCP";

        /// <summary>
        /// 删除目录
        /// RFC 775	Remove the directory
        /// </summary>
        public const string XRMD = "XRMD";

        /// <summary>
        /// RFC 743
        /// </summary>
        public const string XRSQ = "XRSQ";

        /// <summary>
        /// 发送，否则邮件
        /// RFC 737	Send, mail if cannot
        /// </summary>
        public const string XSEM = "XSEM";

        /// <summary>
        /// 发送到终端
        /// RFC 737	Send to terminal
        /// </summary>
        public const string XSEN = "XSEN";

    }
}


